package com.jiyun.model.day07;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Transient;

import java.util.List;

/**
 * @Author mtt
 * @Date 2023/8/4 10：04
 **/
@Data
@ToString
@NoArgsConstructor
@TableName("cataloges")
public class Cataloges {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    @TableField(value = "log_name")
    private String logName;
    private Integer pid;
    private Integer cid;
    private Integer mid;
    private Integer status;
    @TableField(value = "log_sort")
    private Integer logSort;
    @TableField(exist = false)
    @Transient
    private List<Cataloges> children;

    public Cataloges(Long id, String logName, Integer pid, Integer cid, Integer logSort) {
        this.id = id;
        this.logName = logName;
        this.pid = pid;
        this.cid = cid;
        this.logSort = logSort;
    }
}
